<%--
  Created by IntelliJ IDEA.
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java"
         pageEncoding="UTF-8" isELIgnored="false" import="java.util.*"%>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<!-- 新 Bootstrap 核心 CSS 文件 -->
<link href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">

<!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
<script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>

<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
<head>
    <title>工资管理</title>
</head>
<body background="../gz.jpg">
<div class="container-fluid">
    <div class="row clearfix">
        <div class="col-md-12 column">
            <nav class="navbar navbar-default navbar-fixed-top" role="navigation">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                        ss</button> <a class="navbar-brand" href="adminmain.jsp">管理员主页</a>
                </div>
                <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                    <ul class="nav navbar-nav">
                        <li >
                            <a href="adminaddsalary.jsp" >录入工资信息</a>
                        </li>
                    </ul>
                    <form action="listSalary" class="navbar-form navbar-left"
                          method="post" role="search">
                        <div class="form-group">
                            <select class="form-control" name="year">
                                <option selected = "selected" value="noyear" >选择年份</option>
                                <option value="2021">2022</option>
                                <option value="2020">2023</option>
                            </select>
                            <select class="form-control" name="month">
                                <option selected = "selected" value="nomonth">选择月份</option>
                                <option value="1">1</option>
                                <option value="2">2</option>
                                <option value="3">3</option>
                                <option value="4">4</option>
                                <option value="5">5</option>
                                <option value="6">6</option>
                                <option value="7">7</option>
                                <option value="8">8</option>
                                <option value="9">9</option>
                                <option value="10">10</option>
                                <option value="11">11</option>
                                <option value="12">12</option>
                            </select>
                        </div>
                        <div class="form-group">按部门查询：
                            <input class="form-control" type="text" name="deptid" />
                            <button type="submit" class="btn btn-default">
                                <span class="glyphicon glyphicon-search"></span> Search
                            </button>
                        </div>
                        <div class="form-group">按员工号查询：
                            <input type="text" class="form-control" name="id"/>
                        </div>
                        <button type="submit" class="btn btn-default">
                            <span class="glyphicon glyphicon-search"></span> Search
                        </button>
                    </form>
                    <ul class="nav navbar-nav navbar-right">
                        <li class="dropdown">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class="glyphicon glyphicon-th-list"></span><strong class="caret"></strong></a>
                            <ul class="dropdown-menu">
                                <li>
                                    <a href="../login.jsp">切换账号</a>
                                </li>
                                <li class="divider">
                                </li>
                                <li>
                                    <a href="../logout">退出系统</a>
                                </li>
                            </ul>
                        </li>
                    </ul>
                </div>
            </nav>
            <br><br><br>
            <!-- 使用jsp中的for循环来遍历List -->
            <table class="table table-striped">
                <caption>查询结果</caption>
                <thead>
                <tr>
                    <th>描述</th>
                    <th>职工号</th>
                    <th>姓名</th>
                    <th>日期</th>
                    <th>销售额</th>
                    <th>基本工资</th>
                    <th>提成</th>
                    <th>税险</th>
                    <th>实发工资</th>
                </tr>
                </thead>
                <tbody>
                <c:forEach items="${salarys}" var="salary" >
                    <tr>
                        <td>${salary.miaoshu}</td>
                        <td>${salary.id}</td>
                        <td>${salary.name}</td>
                        <td>${salary.date}</td>
                        <td>${salary.salesVolumn}</td>
                        <td>${salary.base}</td>
                        <td>${salary.commision}</td>
                        <td>${salary.tax}</td>
                        <td>${salary.salary}</td>
                    </tr>
                </c:forEach>
                </tbody>
            </table>
        </div>
    </div>
</div>
</body>
</html>
